Optimal. Leaf size=148 \[ \frac {a F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \left (a^2-b^2\right )}+\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \left (a^2-b^2\right )}-\frac {\left (a^2+b^2\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b d (a-b) (a+b)^2}-\frac {b \sin (c+d x) \sqrt {\cos (c+d x)}}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.40, antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2796, 3059, 2639, 3002, 2641, 2805} \[ \frac {a F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \left (a^2-b^2\right )}+\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \left (a^2-b^2\right )}-\frac {\left (a^2+b^2\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b d (a-b) (a+b)^2}-\frac {b \sin (c+d x) \sqrt {\cos (c+d x)}}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2796
Rule 2805
Rule 3002
Rule 3059
Rubi steps
\begin {align*} \int \frac {\sqrt {\cos (c+d x)}}{(a+b \cos (c+d x))^2} \, dx &=-\frac {b \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \frac {\frac {b}{2}-a \cos (c+d x)-\frac {1}{2} b \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{-a^2+b^2}\\ &=-\frac {b \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \sqrt {\cos (c+d x)} \, dx}{2 \left (a^2-b^2\right )}+\frac {\int \frac {-\frac {b^2}{2}+\frac {1}{2} a b \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{\left (a^2-b^2\right ) d}-\frac {b \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {a \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2+b^2\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 b \left (a^2-b^2\right )}\\ &=\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{\left (a^2-b^2\right ) d}+\frac {a F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b \left (a^2-b^2\right ) d}-\frac {\left (a^2+b^2\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b (a+b)^2 d}-\frac {b \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) d (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.70, size = 229, normalized size = 1.55 \[ \frac {\frac {4 b \sin (c+d x) \sqrt {\cos (c+d x)}}{\left (b^2-a^2\right ) (a+b \cos (c+d x))}-\frac {2 \left (\frac {\sin (c+d x) \left (\left (b^2-2 a^2\right ) \Pi \left (-\frac {b}{a};\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) F\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )-2 a b E\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right )}{a \sqrt {\sin ^2(c+d x)}}-\frac {b^2 \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}+2 a \left (2 F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-\frac {2 a \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}\right )\right )}{b (b-a) (a+b)}}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos \left (d x + c\right )}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.91, size = 713, normalized size = 4.82 \[ -\frac {\sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-\frac {4 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticPi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), -\frac {2 b}{a -b}, \sqrt {2}\right )}{\left (-2 a b +2 b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}-\frac {2 a \left (-\frac {b^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{a \left (a^{2}-b^{2}\right ) \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b \right )}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{2 \left (a +b \right ) a \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}-\frac {b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{2 a \left (a^{2}-b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}+\frac {b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{2 a \left (a^{2}-b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}-\frac {3 a b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticPi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), -\frac {2 b}{a -b}, \sqrt {2}\right )}{\left (a^{2}-b^{2}\right ) \left (-2 a b +2 b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}+\frac {b^{3} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticPi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), -\frac {2 b}{a -b}, \sqrt {2}\right )}{a \left (a^{2}-b^{2}\right ) \left (-2 a b +2 b^{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}\right )}{b}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos \left (d x + c\right )}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sqrt {\cos \left (c+d\,x\right )}}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________